#
# Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
#
# GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
# Author: Shawn.Tan
# Date: 2025.10.28
#
# History: Initial Version 2025.10.28
#
#
from DV.gpgpu.trees.instruction_tree import *
from base.Sequence import Sequence
from gpgpu.EnvGPGPU import EnvGPGPU
from gpgpu.GenThreadGPGPU import GenThreadGPGPU


class F100Sequence(Sequence):
    """
    This test template is a simple example which generates 100 instructions
    relying on GreenCode's capabilities to randomly choose instructions,
    operands and operand values.  The set of instructions and the weighting
    (for frequency of selection) is defined in the ALU_Int32_instructions
    instruction tree dictionary - which is coded in
    py/DV/gpgpu/trees/instruction_tree.py.
    """

    def generate(self, **kargs):
        for _ in range(100):
            the_instruction = self.pickWeighted(ALU_Float_Double_instructions)
            self.genInstruction(the_instruction)


MainSequenceClass = F100Sequence
GenThreadClass = GenThreadGPGPU
EnvClass = EnvGPGPU
